<?php
namespace EM\NewsBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class GeographyType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('name' ,'text',array('attr' => array('class' => 'validate[required,maxSize[30]]') ))
              //  ->add('level','hidden',array('required' => false));
              ->add('level', 'entity',array('label' => 'Parent: ',
						'empty_value' => 'Choose a level',
						'class' => 'EMNewsBundle:GeographyLevels',
						'property' => 'level',
                                                'required' => false,
						)); 
        
    }
    public function getName()
    {
        return 'category_form';
    }
}